// pages/range/range.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    listdata: []
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    let titles = ["招聘求职", "房屋租赁", "寻人寻物", "拼车", "征婚交友", "同城换物", "微商", "软件开发"];
    let imgurls = [
      "../../img/images/home/list1.png",
      "../../img/images/home/list2.png",
      "../../img/images/home/list3.png",
      "../../img/images/home/list4.png",
      "../../img/images/home/list5.png",
      "../../img/images/home/list6.png",
      "../../img/images/home/list7.png",
      "../../img/images/home/list8.png"
    ]
    let tourls=[
      '/pages/home/recruit/recruit',
      '/pages/home/topic/topic',
      '/pages/home/topic/topic',
      '/pages/home/topic/topic',
      '/pages/home/topic/topic',
      '/pages/home/topic/topic',
      '/pages/home/topic/topic',
      '/pages/home/topic/topic'
    ]
    let listitems = [];
    for (let i = 0; i < titles.length; i++) {
      let listitem = {
        title: titles[i],
        imgurl: imgurls[i],
        url: tourls[i]
      }
      listitems.push(listitem)
    }
    this.setData({
      listdata: listitems
    })
      wx.setNavigationBarColor({
        frontColor: '#ffffff',
        backgroundColor: '#febf00'
      })
  },
  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  }
})